module CommandJsonSerializer
  def self.as_json model
    if model.success?
      {status: 201, json: model}
    else
      {status: 400, json: model}
    end
  end
end